#pragma once 
#include "Block.h"
#include "..\cryptopp560\osrng.h"

namespace AppliedCryptography
{
	namespace AC = AppliedCryptography;

	template<unsigned int TBlockSize>
	class BlockGen
	{
	public:
		AC::Block<TBlockSize> Gen() const
		{
			byte pcbScratch[ TBlockSize ];
			AC::Block<TBlockSize> output;

			// Construction
			CryptoPP::AutoSeededRandomPool rng;

			// Random Block
			rng.GenerateBlock( pcbScratch, TBlockSize );

			for(unsigned int i=0; i < TBlockSize; i++)
			{
				//printf("pcbScratch[%lu] = %lu\n", i, pcbScratch[i]);
				output[i] = pcbScratch[i];
			};

			return output;
		};
	};
};
